home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / gfx / edit / AmiCAD_2.07.lha / AmiCAD / ARexx / Calc.AmiCAD < prev    next >
Text File  |  2000-11-12  |  1KB  |  30 lines

  1. /* calculatrice en virgule flottante */
  2. /* Version 1.00: Chez Corbin, 7 février 1999, version 1.00 */
  3. /* Version 1.01: 4 Novembre 2000, localisation anglais/français */
  4. /* $VER: Calc.AmiCAD 1.01 (R.Florac, 4/11/00) */
  5.  
  6. options results
  7.  
  8. 'LANGUAGE'
  9. if result="français.language" then fr=1
  10. else fr=0
  11.  
  12. if ~show('L','rexxmathlib.library') then
  13.    call addlib('rexxmathlib.library',0,-30)
  14.  
  15. cr='0a'x
  16.  
  17. if fr=1 then do
  18.     p='"Effectuez la saisie du'cr'calcul à effectuer.'cr'Opérateurs : * / + - // ** %'cr'Fonctions : abs acos acosh asin asinh'cr'atan atanh ceil cos cosh cot cotan'cr'csc exp fabs fact floor int'cr'ln log10 nint pow(x,y) sec'cr'sin sinh sqrt tan tanh"'
  19. end
  20. else do
  21.     p='"Enter the expression'cr'of the calculation.'cr'Operators : * / + - // ** %'cr'Functions : abs acos acosh asin asinh'cr'atan atanh ceil cos cosh cot cotan'cr'csc exp fabs fact floor int'cr'ln log10 nint pow(x,y) sec'cr'sin sinh sqrt tan tanh"'
  22. end
  23. 'ASKTEXT('p',"")'
  24. calcul=result
  25. if calcul="" then exit
  26. resultat = calc.rexx(calcul)
  27. if fr=1 then 'REQUEST("'calcul' = 'resultat||cr'Voulez-vous écrire'cr'ce résultat ?")'
  28. else 'REQUEST("'calcul' = 'resultat||cr'Do-you want to write'cr'this result ?")'
  29. if result="1" then 'WRITE("'resultat'",0,0)'
  30.